import request from '../utils/request'
const api_name = '/course'

export default {
    // 获取首页的讲师和课程数据
    getIndexData() {
        return request({
            url: `http://39.98.120.230:8080/api/course/indexdata`,
            method: 'get'
        })
    },
    //分页获取课程列表数据
    getPagedList(page, limit, searchObj) {
        return request({
            url: `http://39.98.120.230:8080/api/course/search/${page}/${limit}`,
            method: 'post',
            data: searchObj
        })
    },
    // 根据id获取课程详情
    getCourseDetail(id){
        return request({
            url:`http://39.98.120.230:8080/api/course/detail/${id}`,
            method:'get'
        })
    }
}